package com.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.community.dto.MerchantOrders;
import com.community.dto.SupplierOrders;
import com.community.pojo.Merchant;
import com.community.pojo.Supplier;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author TangHaoSong Fly ChenJie HeYuHang
 * @since 2024-05-15
 */
public interface SupplierMapper extends BaseMapper<Supplier> {
    List<Supplier> selectAll();
    void insertSupplier(Supplier supplier);
    Supplier getSupplierById(Long supplierId);
    void updateSupplier(Supplier supplier);
    void deleteSupplier(Long supplierId);

    List<SupplierOrders> supplierByConsumerId(Integer id);
    List<Supplier> queryAll(Supplier supplier);

    /**
     * 拿用户id查询供应商id
     * @param consumerId
     * @return
     */
    int listSupplierId(int consumerId);

}
